// component/companyCoupList/index.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        storeCouponsList: {
            type: Array,
            value: ''
        },
        showCoupFlag: {
            type: Boolean,
            value:false
        }

    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        onStoreCouponosClose(){
           this.setData({
            showCoupFlag:false
           })
        },
        receiveStoreConpons(e) {
          
            let id = e.currentTarget.dataset
            this.triggerEvent('receiveStoreConpons', { id })
        },
        // 去详情
        toDetail(e) {
            let couponType = e.currentTarget.dataset.item.couponType
            let item = JSON.stringify(e.currentTarget.dataset.item)
            console.log(item, "测试测试")
            if (couponType == 1) {  //线上详情
                wx.navigateTo({
                    url: '/pages/coupons/useCoupons/index?&from=company' + '&item=' + item,
                })
            } else {
                wx.navigateTo({
                    url: '/pages/coupons/useCouponsTwo/index?&from=company' + '&item=' + item,
                })
            }

        }
    }
})
